package com.zenithmind.library.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 图书更新DTO
 * 
 * @author ZenithMind
 * @since 2024-06-14
 */
@Data
@Schema(name = "图书更新DTO", description = "更新图书时的数据传输对象")
public class BookUpdateDTO {

    @Size(max = 500, message = "图书标题长度不能超过500个字符")
    @Schema(description = "图书标题", example = "Java编程思想")
    private String title;

    @Size(max = 500, message = "副标题长度不能超过500个字符")
    @Schema(description = "副标题", example = "第4版")
    private String subtitle;

    @Size(max = 20, message = "ISBN长度不能超过20个字符")
    @Schema(description = "ISBN", example = "9787111213826")
    private String isbn;

    @Size(max = 20, message = "ISSN长度不能超过20个字符")
    @Schema(description = "ISSN")
    private String issn;

    @Schema(description = "分类ID", example = "1")
    private String categoryId;

    @Schema(description = "出版社ID", example = "1")
    private String publisherId;

    @Schema(description = "作者IDs，多个用逗号分隔", example = "1,2")
    private String authorIds;

    @Schema(description = "作者姓名，多个用逗号分隔", example = "Bruce Eckel")
    private String authorNames;

    @Schema(description = "出版日期", example = "2007-06-01")
    private LocalDate publishDate;

    @Schema(description = "版本", example = "第4版")
    private String edition;

    @Schema(description = "页数", example = "880")
    private Integer pages;

    @Schema(description = "语言", example = "中文")
    private String language;

    @Schema(description = "图书简介")
    private String summary;

    @Schema(description = "目录")
    private String tableOfContents;

    @Schema(description = "封面图片URL")
    private String coverImage;

    @Schema(description = "价格", example = "99.00")
    private BigDecimal price;

    @Schema(description = "关键词，多个用逗号分隔", example = "Java,编程,面向对象")
    private String keywords;

    @Schema(description = "标签，多个用逗号分隔", example = "编程语言,技术")
    private String tags;

    @Schema(description = "图书类型 (0-纸质书, 1-电子书, 2-音频书)", example = "0")
    private Integer bookType;

    @Schema(description = "总库存数量", example = "10")
    private Integer totalCopies;

    @Schema(description = "状态 (0-下架, 1-上架)", example = "1")
    private Integer status;

    @Schema(description = "是否推荐 (0-否, 1-是)", example = "0")
    private Integer isRecommended;

    @Schema(description = "是否新书 (0-否, 1-是)", example = "1")
    private Integer isNew;

    @Schema(description = "是否热门 (0-否, 1-是)", example = "0")
    private Integer isPopular;

    @Schema(description = "位置信息", example = "A区1层1号书架")
    private String location;

    @Schema(description = "备注")
    private String remarks;
}
